<#assign base=request.contextPath />
<#assign oneLabel="系统管理">

<#assign twoLabel="角色管理">
<#assign twoUrl=base+"/role/list">

<#assign leafLabel="角色列表">
<!DOCTYPE html>
<html lang="en">
<head>
 	<#include "/commons/headImport.ftl">
</head>
<body>
<#include "/commons/header.ftl">
<form class="form-horizontal" name="formName">
	<div class="row">
	    <div class="col-xs-12">
	        <div class="form-group">
	            <label class="col-sm-2 control-label no-padding-right" for="form-field-1">名称</label>
	            <div class="col-sm-4">
	                <input type="text" name="keyWord" value="${roleQueryDO.keyWord!''}" class="col-xs-10 col-sm-10" />
	            </div>
	            <div class="col-sm-4orm-group center">
	                <button class="btn btn-xs btn-success" type="button" id="search_id" url="${base}/role/list">
	                    <i class="icon-search icon-on-right bigger-110"></i>查询
	                </button>
	                <button class="btn btn-xs" type="reset" id="reset_id" url="${base}/role/list">
	                    <i class="icon-undo bigger-110"></i>重置
	                </button>
	            </div>
	        </div>
	        <div class="space-4"></div>

	        <div class="table-responsive">
	            <p>
	            <@shiro.hasPermission name="/role/delete">
	                <button class="btn btn-minier btn-success" id="to_add_id" url="${base}/role/add">
	                    <i class="icon-plus bigger-110"></i>新增角色
	                </button>
	             </@shiro.hasPermission>
	            </p>
	            <table class="table table-striped table-bordered table-hover">
	                <thead>
	                    <tr>
	                        <th class="center" width="5%">#</th>
	                        <th width="15%">名称</th>
	                        <th width="30%">备注</th>
	                        <th width="13%"><i class="icon-time bigger-110 hidden-480"></i>创建时间</th>
	                        <th width="13%"><i class="icon-time bigger-110 hidden-480"></i>修改时间</th>
	                        <th width="24%"></th>
	                    </tr>
	                </thead>
	
	                <tbody>
	                <#if pr??>
	                    <#list pr.data as role>
	                    <tr>
	                        <td class="center">${role_index+1}</td>
	                        <td>${role.name}</td>
	                        <td title="${role.remark}">
	                        	<#if (role.remark?length > 10)>${role.remark?substring(0,9)}...<#else>${role.remark}</#if>
	                        </td>
	                        <td>${role.gmtCreate?string('yy-MM-dd HH:mm')}</td>
	                        <td>${role.gmtUpdate?string('yy-MM-dd HH:mm')}</td>
	                        <td>
								<div class="visible-md visible-lg hidden-sm hidden-xs btn-group">
								 <@shiro.hasPermission name="/role/get">
									<a class="btn btn-minier btn-info" href="javascript:get('${base}/role/get/${role.id}');" title="详情">
										<i class="icon-search bigger-120"></i>详情
									</a>
								  </@shiro.hasPermission>
								  <@shiro.hasPermission name="/role/edit">
									<a class="btn btn-minier btn-success" href="javascript:get('${base}/role/edit/${role.id}');" title="编辑">
										<i class="icon-edit bigger-120"></i>编辑
									</a>
									</@shiro.hasPermission>
									<@shiro.hasPermission name="/role/bind">
									<a class="btn btn-minier btn-success" href="javascript:get('${base}/role/bind/${role.id}');" title="授权">
										<i class="icon-euro bigger-120"></i>授权
									</a>
									</@shiro.hasPermission>
									<@shiro.hasPermission name="/role/delete">
									<a class="btn btn-minier btn-danger id-btn-dialog2" 
										data='({"url":"${base}/role/delete/${role.id}","form":"formName"})' 
										href="javascript:void(0);" title="删除">
										<i class="icon-trash bigger-120"></i>删除
									</a>
									</@shiro.hasPermission>
								</div>												
	                        </td>
	                    </tr>
	                    </#list>
	                </#if>
					<#if ((pr.data)?size==0)>
						<tr>
							<td colspan="9" class="center">没有查询任何数据</td>
						</tr>
					</#if>
	                </tbody>
	            </table>
	            
				<@p.p pageParam=pr toURL="${base}/role/list" formName="formName"/>
            </div><!-- /.table-responsive -->
        </div><!-- /col -->
    </div><!-- /row -->
</form>
<#include "/commons/footer.ftl">
</body>
</html>
